package cn.zn.framework.common.abs;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author zn
 */
@Data
public abstract class AbsOldMainEntity {
    @TableId(value = "ID_", type = IdType.ASSIGN_UUID)
    private String id;

    @TableField(value = "CREATE_TIME_", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "CREATE_USER_ID_", fill = FieldFill.INSERT)
    private String createUserId;

    @TableField(value = "UPDATE_TIME_", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @TableField(value = "UPDATE_USER_ID_", fill = FieldFill.INSERT_UPDATE)
    private String updateUserId;

    @TableField(value = "SORT_NUM_", fill = FieldFill.INSERT)
    private Integer sortNum;

    @TableField(value = "REMARK_")
    private String remark;

    @TableField(value = "IS_ACTIVE_", fill = FieldFill.INSERT)
    private Boolean isActive;

    @TableField(value = "VERSION_", fill = FieldFill.INSERT)
    private Integer version;
}
